The Issue with Maps Being Displayed in Red on iOS Simulators Running iOS 18.0 or Later

The Issue with Maps Being Displayed in Red on iOS Simulators Running iOS 18.0 or Later

Clock Icon2025.01.17

NOTE: This article is an English translation of "iOS 18.0以降のiOSシミュレータで地図を表示すると真っ赤になってしまう問題."

Previously, in the article "Fixing the Issue of SafariViewController Freezing in the Combination of Xcode 16.0 and iOS 18.0 Simulators," I discussed how the Excluded Architectures setting caused issues where SFSafariViewController and UIImagePickerController would not function properly.

Later, during testing with Xcode 16.2, it was discovered that enabling the Excluded Architectures setting also caused similar issues with map display functionality (MapKit). This article explains this newly identified issue.

Overview of the Issue

In iOS simulators running iOS 18.0 or later, enabling the Excluded Architectures setting causes maps to appear completely red. This issue does not occur on physical devices.

Sample Code for Testing

Below is a minimal sample code that uses MapKit to display the area around the Imperial Palace in Tokyo. When this code is run on an iOS simulator with iOS 18.0 or later, the issue can be reproduced.

import SwiftUI
import MapKit

struct ContentView: View {
    @State private var region = MKCoordinateRegion(
        center: CLLocationCoordinate2D(latitude: 35.6844779, longitude: 139.7512224),
        span: MKCoordinateSpan(latitudeDelta: 0.05, longitudeDelta: 0.05)
    )

    var body: some View {
        Map(coordinateRegion: $region)
    }
}

#Preview {
    ContentView()
}

Testing Results

The sample code above was executed on an iPhone 16 Pro / iOS 18.0 simulator. The table below summarizes the behavior differences depending on whether the Excluded Architectures setting is enabled or not.

When Excluded Architectures is Enabled When Excluded Architectures is Disabled
Map turns completely red Map displays correctly

From these results, the following observations were made:

  • When Excluded Architectures is enabled, the map turns red.
  • When Excluded Architectures is disabled, the map displays correctly.

Summary

Issue

This issue, like the previously reported problems with SFSafariViewController and UIImagePickerController, appears to be caused by the Excluded Architectures setting.

  • The issue where SFSafariViewController displays a blank white screen and the app freezes.
  • The issue where UIImagePickerController causes the app to freeze.
  • The issue where MapKit displays maps in red.

These issues have been occurring in the simulator environment since the release of Xcode 16.0 and iOS 18.0 on September 16, 2024, and as of December 2024, they remain unresolved. It is advisable to remove this setting as soon as possible.

Solution

The Excluded Architectures setting can be found in the Build Settings section of the project, as shown in the image below. Removing this setting resolves the issue.

20241219164422

However, as mentioned in the previous article, if the third-party SDKs your app depends on do not support arm64, the issue may not be resolved. In such cases, you will need to request the SDK provider to add arm64 support.

(Updated on 2025/01/17)

An Apple developer on the Apple Developer Forums requested a minimal project setup that reproduces the issue, so I created a sample project.

https://github.com/CH3COOH/SampleXcode16IOS18MKMapKit

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.